using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._AreaandVolume
{
    /// <summary>
    /// <para>Polygon Volume</para>
    /// <para>Calculates the volume and surface area between a polygon of a constant height and a surface.</para>
    /// <para>计算恒定高度的多边形与曲面之间的体积和表面积。</para>
    /// </summary>    
    [DisplayName("Polygon Volume")]
    public class PolygonVolume : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public PolygonVolume()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_surface">
        /// <para>Input Surface</para>
        /// <para>The TIN, terrain, or LAS dataset surface to process.</para>
        /// <para>要处理的 TIN、terrain 或 LAS 数据集表面。</para>
        /// </param>
        /// <param name="_in_feature_class">
        /// <para>Input Features</para>
        /// <para>The polygon features that define the region being processed.</para>
        /// <para>用于定义正在处理的区域的面要素。</para>
        /// </param>
        /// <param name="_in_height_field">
        /// <para>Height Field</para>
        /// <para>The field in the polygon's attribute table that defines the height of the reference plane used in determining volumetric calculations.</para>
        /// <para>面属性表中用于定义用于确定体积计算的参考平面高度的字段。</para>
        /// </param>
        public PolygonVolume(object _in_surface, object _in_feature_class, object _in_height_field)
        {
            this._in_surface = _in_surface;
            this._in_feature_class = _in_feature_class;
            this._in_height_field = _in_height_field;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Polygon Volume";

        public override string CallName => "3d.PolygonVolume";

        public override List<string> AcceptEnvironments => ["extent", "geographicTransformations", "terrainMemoryUsage", "workspace"];

        public override object[] ParameterInfo => [_in_surface, _in_feature_class, _in_height_field, _reference_plane.GetGPValue(), _out_volume_field, _surface_area_field, _pyramid_level_resolution, _output_feature_class];

        /// <summary>
        /// <para>Input Surface</para>
        /// <para>The TIN, terrain, or LAS dataset surface to process.</para>
        /// <para>要处理的 TIN、terrain 或 LAS 数据集表面。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Surface")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_surface { get; set; }


        /// <summary>
        /// <para>Input Features</para>
        /// <para>The polygon features that define the region being processed.</para>
        /// <para>用于定义正在处理的区域的面要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_feature_class { get; set; }


        /// <summary>
        /// <para>Height Field</para>
        /// <para>The field in the polygon's attribute table that defines the height of the reference plane used in determining volumetric calculations.</para>
        /// <para>面属性表中用于定义用于确定体积计算的参考平面高度的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Height Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_height_field { get; set; }


        /// <summary>
        /// <para>Reference Plane</para>
        /// <para><xdoc>
        ///   <para>The direction from the reference plane that volume and surface area will be calculated.</para>
        ///   <bulletList>
        ///     <bullet_item>Calculate above the plane—Volume and surface area are calculated above the reference plane height of the polygons.</bullet_item><para/>
        ///     <bullet_item>Calculate below the plane—Volume and surface area are calculated below the reference plane height of the polygons. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>从参考平面计算体积和表面积的方向。</para>
        ///   <bulletList>
        ///     <bullet_item>在平面上方进行计算 - 体积和表面积在面的参考平面高度上方计算。</bullet_item><para/>
        ///     <bullet_item>在平面下方进行计算 - 体积和表面积在面的参考平面高度下方进行计算。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reference Plane")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _reference_plane_value _reference_plane { get; set; } = _reference_plane_value._BELOW;

        public enum _reference_plane_value
        {
            /// <summary>
            /// <para>Calculate above the plane</para>
            /// <para>Calculate above the plane—Volume and surface area are calculated above the reference plane height of the polygons.</para>
            /// <para>在平面上方进行计算 - 体积和表面积在面的参考平面高度上方计算。</para>
            /// </summary>
            [Description("Calculate above the plane")]
            [GPEnumValue("ABOVE")]
            _ABOVE,

            /// <summary>
            /// <para>Calculate below the plane</para>
            /// <para>Calculate below the plane—Volume and surface area are calculated below the reference plane height of the polygons. This is the default.</para>
            /// <para>在平面下方进行计算 - 体积和表面积在面的参考平面高度下方进行计算。这是默认设置。</para>
            /// </summary>
            [Description("Calculate below the plane")]
            [GPEnumValue("BELOW")]
            _BELOW,

        }

        /// <summary>
        /// <para>Volume Field</para>
        /// <para>Specifies the name of the field that will contain volumetric calculations. The default is Volume.</para>
        /// <para>指定将包含体积计算的字段的名称。默认值为 Volume。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Volume Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_volume_field { get; set; } = null;


        /// <summary>
        /// <para>Surface Area Field</para>
        /// <para>Specifies the name of the field that will contain the surface area calculations. The default is SArea.</para>
        /// <para>指定将包含表面积计算的字段的名称。默认值为 SArea。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Surface Area Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _surface_area_field { get; set; } = null;


        /// <summary>
        /// <para>Pyramid Level Resolution</para>
        /// <para>The z-tolerance or window-size resolution of the terrain pyramid level that will be used. The default is 0, or full resolution.</para>
        /// <para>将使用的地形金字塔级别的 z 容差或窗口大小分辨率。默认值为 0，即全分辨率。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Pyramid Level Resolution")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _pyramid_level_resolution { get; set; } = 0;


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_feature_class { get; set; }


        public PolygonVolume SetEnv(object extent = null, object geographicTransformations = null, object terrainMemoryUsage = null, object workspace = null)
        {
            base.SetEnv(extent: extent, geographicTransformations: geographicTransformations, terrainMemoryUsage: terrainMemoryUsage, workspace: workspace);
            return this;
        }

    }

}